//
//  RMMJiaDanBottomView.m
//  Romomo
//
//  Created by puman on 2017/2/14.
//  Copyright © 2017年 mazegong. All rights reserved.
//

#import "RMMJiaDanBottomView.h"

@implementation RMMJiaDanBottomView
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = kWhiteColor;
        
        UILabel *lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, 0.5)];
        lineLabel.backgroundColor = RGBA(221, 221, 221, 1);
        [self addSubview:lineLabel];
        
        //        _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(15, 16, 16, 16)];
        //        _imageV.image = [UIImage imageNamed:@"可选@2x"];
        //        [self addSubview:_imageV];
        
        _totalPriceLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, kRow, kScreenWideth - 122 - 15, 16)];
        _totalPriceLabel.text = @"总计: ¥0.00";
        _totalPriceLabel.font = kFont(14);
        _totalPriceLabel.textColor = COLORFROMCODE(0x303137, 1);
        [self addSubview:_totalPriceLabel];
        
        _youHuiLabel = [[UILabel alloc] initWithFrame:CGRectMake(_totalPriceLabel.left, _totalPriceLabel.bottom, _totalPriceLabel.width, 14)];
        _youHuiLabel.text = @"服务时间: 0分钟";
        _youHuiLabel.font = kFont(10);
        _youHuiLabel.textColor = COLORFROMCODE(0xBFBFBF, 1);
        [self addSubview:_youHuiLabel];
        
        _goBuyBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _goBuyBut.frame = CGRectMake(kScreenWideth - 122, 6.5, 107, 36);
        _goBuyBut.layer.cornerRadius = 18;
        _goBuyBut.layer.borderWidth = 1;
        _goBuyBut.layer.borderColor = COLORFROMCODE(0xF3F2F3 , 1).CGColor;
        [_goBuyBut setTitleColor:COLORFROMCODE(0xD7D7D7 , 1) forState:(UIControlStateNormal)];
        _goBuyBut.titleLabel.font = kBFont(14);
        // _goBuyBut.backgroundColor = COLORFROMCODE(0x, <#a#>)
        [_goBuyBut setTitle:@"去结算" forState:(UIControlStateNormal)];
        [self addSubview:_goBuyBut];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
